class FundProfit:

    def __init__(self):
        # 投资方式
        self.invModel = ''
        # 每次投入金额
        self.everyMoney = 0
        # 每次投入产生的收益
        self.eveyProfit = []
        # 总投入
        self.totalInvestment = 0
        # 总收益
        self.profit = 0
        # 期数
        self.numberPeriods = 0
        # 总份额
        self.totalShare = 0
        # 卖出总金额
        self.lastProfit = 0
        # 每个周期的具体时间
        self.chooseTime = ''
        # 每期日期列表
        self.date_list = []


    def __str__(self):
        if(self.invModel == '每日定投'):
            msg = str(self.invModel) + str(self.everyMoney) + '元，共'+str(self.numberPeriods)+'期，共计投入金额为'+str(self.totalInvestment)+'元，卖出总金额为'+str(self.lastProfit)+',利润为'+str(self.profit)+'元。'
            return msg
        elif(self.invModel == '每周定投'):
            msg = str(self.invModel) +'，每周的'+str(self.chooseTime)+'投入'+ str(self.everyMoney) + '元，共' + str(self.numberPeriods) + '期，共计投入金额为' + str(self.totalInvestment) + '元，卖出总金额为' + str(self.lastProfit) + '元,利润为' + str(self.profit)+'元。'
            return msg
        else:
            msg = str(self.invModel) + '，每月的' + str(self.chooseTime) + '号投入' + str(self.everyMoney) + '元，共' + str(self.numberPeriods) + '期，共计投入金额为' + str(self.totalInvestment) + '元，卖出总金额为' + str(self.lastProfit) + '元,利润为' + str(self.profit)+'元。'
            return msg

